home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Sep 90 / MacApp.Tech$ 9⁄14⁄90 / 1945-Re gTarget and text -Sep90 next >
Encoding:
Text File  |  1991-03-06  |  1.5 KB  |  55 lines  |  [TEXT/GEOL]

  1. Item    2643453                         8-Sept-90        00:36PDT
  2.  
  3. From:   D6020                           Info Research, John MacVeigh,PRT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    RE: gTarget and text views
  8.  
  9. Mark,
  10.  
  11. You didn't say if these views are all within a TDialogView or not. If not, then
  12. the TEditText won't work. If so, then you have to Override the TTEView's
  13. DoMouseCommand as follows:
  14.  
  15. {$S ASelCommand}
  16. Function TMyTTEView.DoMouseCommand (Var theMouse: Point; Var Info: EventInfo;
  17.    Var Hysteresis: Point): TCommand; OVERRIDE;
  18.  
  19. Var   aDialogView: TMyDialog;
  20.  
  21. Begin
  22.    If gTarget = Self
  23.    Then DoMouseCommand := INHERITED DoMouseCommand (theMouse, Info, Hysteresis)
  24.  
  25.    Else Begin
  26.    aDialogView := TMyDialog(GetDialogView);
  27.    If aDialogView = Nil
  28.    Then Begin
  29.    {$IFC qDebug}
  30.    Writeln ('TMyTextView is NOT in a dialog.');
  31.    {$ENDC}
  32.    DoMouseCommand := gNoChanges
  33.    End
  34.    Else Begin
  35.    aDialogView.DoSelectEditText (Nil, False);  {attempt to deselect current
  36. edit text}
  37.    If aDialogview.fCurrentEditText <> Nil  {failed}
  38.    Then DoMouseCommand := gNoChanges
  39.    Else Begin
  40.    GetWindow.SetTarget (Self);
  41.    DoMouseCommand := INHERITED DoMouseCommand (theMouse, Info, Hysteresis)
  42.    End
  43.    End
  44.    End
  45. End;   {TMyTTEView.DoMouseCommand}
  46.  
  47. Checking back through FrameWorks, I see that I got this from Tommi at Kopfwerk;
  48. and neither of us wanted to put the TTEView into the tabbing sequence, so
  49. you'll have to work that out yourself.
  50.  
  51. Hope this helps,
  52. --John MacVeigh
  53.  
  54.  
  55.